package Concurrency2.Inteview01_ThreadPool.version03;

import Concurrency2.Inteview01_ThreadPool.version01.ThreadPool;

/**
 * 作用: 具体的拒绝策略
 */
public class AbortPolicy implements RejectedExecutionHandler {
    @Override
    public void rejectedExecution(Runnable task, ThreadPool executor) {
        throw new RuntimeException("线程池已满, 队列已满.");
    }
}
